<template>
  <div class="login-form">
    <el-form label-position="top" label-width="80px" :model="formData">
      <el-form-item label="名称">
        <el-input v-model="formData.name"></el-input>
      </el-form-item>
      <el-form-item label="活动区域">
        <el-input v-model="formData.region"></el-input>
      </el-form-item>
      <el-button type="primary" @click="login()">登录</el-button>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "Login",
  data() {
    return {
      formData: {
        username:"",
        password:""
      }
    };
  },
  methods:{
    login(){
      this.$http.post('login',this.formData).then((res)=>{
        console.log(res)
      })
    }
  }
};
</script>

<style scoped>
.login-form {
  background-color: aqua;
}
</style>